home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / avahi-daemon.postinst < prev    next >
Encoding:
Text File  |  2007-03-27  |  1.4 KB  |  51 lines

  1. #! /bin/sh
  2. # postinst script for avahi
  3.  
  4. set -e
  5.  
  6. # summary of how this script can be called:
  7. #        * <postinst> `configure' <most-recently-configured-version>
  8. #        * <old-postinst> `abort-upgrade' <new version>
  9. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  10. #          <new-version>
  11. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  12. #          <failed-install-package> <version> `removing'
  13. #          <conflicting-package> <version>
  14. # for details, see http://www.debian.org/doc/debian-policy/ or
  15. # the debian-policy package
  16.  
  17. case "$1" in
  18.   configure)
  19.     if ! getent passwd avahi >/dev/null; then
  20.       adduser --disabled-password  --quiet --system \
  21.         --home /var/run/avahi-daemon \
  22.         --gecos "Avahi mDNS daemon" --group avahi
  23.     fi
  24.     # If the Avahi user has the old home, change it
  25.     if ! getent passwd avahi | grep -q /var/run/avahi-daemon; then
  26.         usermod -d /var/run/avahi-daemon avahi
  27.     fi
  28.  
  29.     # Add the netdev group unless it's already there
  30.     if ! getent group netdev >/dev/null; then
  31.       addgroup --quiet --system netdev || true
  32.     fi
  33.  
  34.     # Ask the bus to reload the config file
  35.     if [ -x "/etc/init.d/dbus" ]; then
  36.       invoke-rc.d dbus force-reload || true
  37.     fi
  38.     /etc/init.d/avahi-daemon restart
  39.   ;;
  40.   abort-upgrade|abort-remove|abort-deconfigure)
  41.   ;;
  42.   *)
  43.     echo "postinst called with unknown argument \`$1'" >&2
  44.     exit 1
  45.   ;;
  46. esac
  47.  
  48.  
  49.  
  50. exit 0
  51.